
import { observable, computed, action } from 'mobx';
import ModelPicture from '../modal/modalPicture.js';

export default class TodoListModel {
  @observable sliderHeight = 288;
  @observable items = [];


  @computed
  get npm() {
    return this.todos.filter(todo => !todo.finished).length;
  }

  @action addList() {
    this.sliderHeight = '';
    this.items = [];
  }

  @action addPicture() {
    const newPicture = new ModelPicture();
    this.items.push(newPicture);
  }

  @action setSliderHeight(hei) {
    this.sliderHeight = hei;
  }



}
